#实例1
n = int(input(""))
x = 0
for y in range(n+1):
    x = x + y
print(x)
#实例2
n = int(input(""))
x = 0
for y in range(n+1):
    x = x + y
print(x)